<script setup lang="ts">
import Mo from './mo.vue'
import PadPc from './pad&pc.vue'
import { useWindowSize } from '@vueuse/core'
import type { Data } from './types.ts'
import { getImgSrc } from '@/views/product/reno14-pro/image/5/img-src'

const { width } = useWindowSize()

const videoSrc = getImgSrc('videos-game-live_800.mp4')
const data: Data = {
  mainTitle: ['ColorOS 自由浮窗', '游戏生活两不误'],
  list: [
    {
      mainTitle: '既能后台开语音',
      subtitle: '手上操作没停过，嘴上输出也没停过。',
      videoSrc,
    },
    {
      mainTitle: '或者小窗回消息',
      subtitle: '玩游戏的间隙，抽空回复姐妹邀约。',
      videoSrc,
    },
    {
      mainTitle: '还能小窗短视频',
      subtitle: '破译密码等待片刻，够刷上几个小视频。',
      videoSrc,
    },
    {
      mainTitle: '甚至同时小窗多任务',
      subtitle: '无需三头六臂，也能分身有术。',
      videoSrc,
    },
  ],
}
</script>

<template>
  <div>
    <keep-alive>
      <Mo v-if="width < 640" :data />
      <PadPc v-else :data />
    </keep-alive>
  </div>
</template>
